#include "../VoicePlayer_h/VoicePlayer.h"
#include <QString>

class QFile;
class QAudioInput;
class QAudioOutput;

class VoicePlayerImp : public VoicePlayer{
public:
    VoicePlayerImp();
    VoicePlayerImp(QString newFilePath);
    void Record();
    void Play();
    void Finish();

    void SetFilePath(QString newFilePath){
        _savedFilePath = newFilePath;
    }

private:
    QString _savedFilePath;        //暂存声音文件的位置
    QFile*   _curFile;
    QAudioInput * _input;
    QAudioOutput* _output;
};
